package com.micmac.main.modules.controllers {
	
	import com.micmac.main.modules.events.CustomModuleEvent;
	import com.micmac.main.modules.services.ModuleManagerService;
	
	import org.robotlegs.mvcs.Command;
	
	public class LoadModuleCommand extends Command {
		[Inject]
		public var moduleEvent:CustomModuleEvent;
		
		[Inject]
		public var moduleManager:ModuleManagerService;
		
		override public function execute():void {
			trace("[LoadModuleCommand.execute]");
			
			var url:String = moduleEvent.url;
			trace(" >> url:" + url);
			
			moduleManager.loadModule(url);
		} 
	}
}